/**
 * Jaxson ajax
 *
 * Copyright Remedy Interactive, licensed under Apache version 2 license:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0.html
 *
 * This notice must remain in all java source files.
 */

package org.jaxson.util.locale;


import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.PropertyResourceBundle;


/**
 * Wrapper around PropertyResourceBundle which returns the string: <br />
 * 
 * <code>
 * --undefined key {keyname}--
 * </code> for keys not in the bundle.
 * 
 * @author Joe Maisel
 */
public class NotNullPropertyResourceBundle extends PropertyResourceBundle implements Serializable
{
	public NotNullPropertyResourceBundle (InputStream stream) throws IOException
	{
		super( stream );
	}

	public String get( String key )
	{
		return super.getString( key ) == null ? "--undefined key: " + key + "--" : super.getString( key );
	}

	private static final long serialVersionUID = -9094313102801643571L;
}